<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="__STATIC__/js/jquery-1.8.2.min.js"></script>
        <script src="__STATIC__/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
        <link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
        <link rel="stylesheet" href="__STATIC__/bootstrap/css/bootstrap.min.css"/>
        <link rel="stylesheet" href="__STATIC__/admin/css/common.css" />
        <title>货品列表</title>
    </head>
    <body>
    <div class="container-fluid">
    <div class="row-fluid">
    <div class="span12">    
        <table class='table table-hover table-bordered'>
            <tr class="success">
                <th>货品ID</th>
                <foreach from="$addData" key="$key" value="$v">
                    <th>{$v.title}</th>
                </foreach>
                <th>库存</th>
                <th>货号</th>
                <th>操作</th>
            </tr>
    <form action="" method="post">
            <!-- 如果已添加数目小于可能情况数目，才出现添加货品的输入框 -->
            <tr class="info">
                <td>{$oldData.glid}</td>
                    <foreach from="$addData" key="$k" value="$v">
                        <td>
                            <select name="spec[]" class="form-control input-sm">
                                <option value="0">请选择</option>
                                    <foreach from="$v['value']" key="$k" value="$value">
                                        <option value="{$value.gaid}" <if value="in_array($value['gaid'],$oldData['gaid'])">selected="selected"</if>>{$value.ganame}</option>
                                    </foreach>
                            </select>
                        </td>
                    </foreach>
                <td>
                    <input type="text" name='fqty' class="form-control  input-sm" value="{$oldData.fqty}"/>
                </td>
                <td>
                    <input type="text" name='number' class="form-control  input-sm" value="{$oldData.number}"/>
                </td>
                <td>
                    <input type="hidden" name="goods_gid" id="" value="{$oldData.goods_gid}"/>
                     <input type="hidden" name="glid" id="" value="{$oldData.glid}"/>
                    <input type="submit" value='修改' class="btn btn-success active"/>
                </td>
            </tr>
        </table> 
    </form>
    </div>
    </div>
    </div>


    </body>
</html>
